package com.lhy.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.lhy.domain.Tea;
import com.lhy.service.IUserService;

@Controller
@RequestMapping("/teadetail")
public  class TeadetailController {
	@Autowired
	private IUserService userService;
	@RequestMapping("")
	public ModelAndView list(String teaId){
		ModelAndView mv = new ModelAndView();
		try {
			Tea tea = userService.queryTeaByteaId(Integer.valueOf(teaId));
			mv.addObject("tea",tea);
			mv.setViewName("teadetail");
		} catch (Exception e) {
			e.printStackTrace();
		}
		return mv;
	}
}
